/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.ejb.interfaces;

import com.comut.crud.pojo.driver.Driver;
import com.comut.crud.pojo.mobile.DriverDetail;
import com.comut.crud.pojo.mobile.DriverInfo;
import com.comut.lib.exception.ObjectFoundException;
import com.comut.lib.exception.ObjectNotFoundException;
import javax.jws.WebMethod;

/**
 *
 * @author asantos
 */
public interface IDriverAction {

    /**
     * Inserts Driver on the database
     *
     * @param driver the {@link Driver} to be inserted
     * @return the inserted {@link Driver}
     */
    @WebMethod
    public Driver insertDriver(Driver driver) throws ObjectFoundException;

    /**
     * Deletes a Driver from the database
     *
     * @param driver the {@link Driver} to be deleted
     */
    @WebMethod
    public void deleteDriver(Driver driver) throws ObjectNotFoundException;

    /**
     * Update a event on the database
     *
     * @param driver the update {@link driver} *
     */
    @WebMethod
    public void updateDriver(String driver) throws ObjectNotFoundException;

    /**
     * Gets a Driver from the database
     *
     * @param driver the {@link Driver} to be found
     * @return the {@link Driver} found
     */
    @WebMethod
    public Driver getDriver(Driver driver) throws ObjectNotFoundException;

    /**
     * Gets the list of drivers for a user id. Issue: IFL-1569
     *
     * @param userId
     * @return
     * @throws ObjectNotFoundException
     */
    @WebMethod
    public DriverInfo[] getListDrivers(int userId) throws ObjectNotFoundException;
    
    /**
     * Gets the driver detail for a user id and driver id. Issue: IFL-1570
     *
     */
    @WebMethod
    public DriverDetail getDriverDetail(int userId,int driverId) throws ObjectNotFoundException;
    
}
